<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>获取网页中的标签对象</title>
</head>
<body>
<div id="mydiv01">div01</div>
</body>
</html>
<script type="text/javascript">
    //通过标签对象的id 属性值来获取
    var elementDiv=document.getElementById('mydiv01');
    console.log(elementDiv);
</script>